{{wrap with="admin_page_layout.phtml"}}
  {{into slot="content_zone"}}

    {{include file="_admin_object/actions.phtml"/}}
    {{include file='_widgets/cms_document_breadcrumbs.phtml' item="{$#item}" base_path="/admin_document/display/" link_field='id' root_path='/admin_document/' root_title="Список документов" /}}

    <div id="header">
      <h1>
        <? if(!$this->is_root) : ?>
          Страница &laquo;<a href="{$#item.uri}" title="Посмотреть на сайте" target="_blank">{$#item.title}</a>&raquo;
        <? else : ?>
          Список документов
        <? endif; ?>
      </h1>

      <div class="header_actions">
        <? if(!$this->is_root) : ?>

          {{apply template="object_action" item="{$#item}" action="create" is_link="true" title="Добавить документ" icon="page_add"/}}
          {{apply template="object_action_edit" item="{$#item}" icon="page_edit" is_link="true" title="Редактировать"/}}

          <? if($this->item->getIsPublished()) : ?>
            {{apply template="object_action_unpublish" item="{$#item}" icon="lightbulb_off" is_link="true" title="Снять с публикации"/}}
          <?  else:  ?>
            {{apply template="object_action_publish" item="{$#item}" icon="lightbulb" is_link="true" title="Опубликовать"/}}
          <? endif; ?>

          {{apply template="object_action_delete" item="{$#item}" is_link="true" title="Удалить"/}}





        <?  else:  ?>
          <?php $item = lmbCmsDocument :: findRoot(); ?>
          {{apply template="object_action" item="{$item}" action="create" title="Создать документ" icon="page_add" is_link="true"/}}
        <? endif ?>

      </div>
    </div>

    <div id="body">
      {{include file='_admin/pager.phtml' items="{$#items}"/}}
      {{include file='admin_document/include/items_list.phtml' items="{$#items}"/}}
    </div>

  {{/into}}
{{/wrap}}
